<!DOCTYPE html>
<html lang="zh-CN">


<!--
 * @Description: 
 * @Author: longfei
 * @FilePath: \go\view\login.html
-->

<head id="Head1">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="applicable-device" content="pc,mobile" />
    <title>登陆后台</title>
    <meta content="" name="description" />
    <link rel="stylesheet" type="text/css" href="https://www.layuicdn.com/layui/css/layui.css" />
    <link rel="stylesheet" href="/static/css/all.min.css">
    <link rel="stylesheet" href="/static/css/login.css?2">

</head>

<body>



    <div class="dowebok" id="dowebok">
        <div class="form-container sign-in-container" style="left: 0;width: 100%; z-index: 2;" id="zcc">

        </div>
        <div class="form-container sign-in-container" style="left: 0;width: 100%;z-index: 2;" id="dll">
            <form class="layui-form" action="" lay-filter="example">
                <h1>登陆后台</h1>
                <span>------------------------------</span>
                <input type="text" name="name" placeholder="手机号">
                <input type="password" name="pwd" placeholder="密码">
                <input type="text" name="code" placeholder="验证码">
                <a> </a>

                <button type="submit" lay-submit="" lay-filter="demo1">登录</button>
                <a href="#"> </a>
                <div></div>
            </form>


            <script>
                function refreshVerify() {
                    var ts = Date.parse(new Date()) / 1000;
                    $('#verify_img').attr("src", "/captcha?id=" + ts);
                }
                function ycdl() {
                    $("#dll").hide();
                    $("#zcc").show();
                }
            </script>
        </div>

    </div>

    <script type="text/javascript" src="/static/css/jquery-3.4.1.min.js"></script>
    <script src="https://www.layuicdn.com/layui/layui.js"></script>
    <script>
        layui.use(['form', 'layer'], function () {
            var layer = layui.layer,
                form = layui.form,
                $ = layui.$;
            form.on('submit(demo1)', function (data) {
                let b=data.field
                $.post("/admin/sub", { "name":b.name,"pwd":b.pwd,"code":b.code }, function (result) {
                    layer.msg(result.msg)
                    if(result.code==200){
                       // return false;
                        setTimeout("window.location.href = '/admin/'", 1500 )
                    }
                });
                return false;
            });
        });
    </script>



</body>

</html>